<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>LZXリファレンス animatorgroup</title>
  <othercredit role="translator">
    <firstname>Hiroyuki</firstname>
    <surname>Kato</surname>
        <contrib>2006/05/16　翻訳初版</contrib>
 </othercredit>
</head>
<body>

<!-- ===================================================================== -->
<!-- = XML information goes here                                         = -->
<!-- ===================================================================== -->
<lzelement title="Animatorgroup">
    <lztier>LFC</lztier>
    <lzcategory>Animation</lzcategory>
    <lzshortdesc>
             複数のアニメータの挙動を調整します。
    </lzshortdesc>
    <lztag>tag-animatorgroup.xml</lztag>
    <lzapi>api-lzanimatorgroup.xml</lzapi>
</lzelement>

<p><classname>LzAnimatorGroup</classname>は複数の<classname>LzAnimator</classname>
を子要素に含み、それらの子要素を連続、又は同時に実行します。例として、
以下のコードは始めにX座標を変化させ、その後にY座標を変化させています。</p>
  
<example extract="false">
&lt;canvas&gt;
  &lt;view bgcolor="red" width="100" height="100"&gt;
    &lt;animatorgroup process="sequential"&gt;
      &lt;animator attribute="x" to="100" duration="1000"/&gt;
      &lt;animator attribute="y" to="100" duration="1000"/&gt;
    &lt;/animatorgroup&gt;
  &lt;/view&gt;
&lt;/canvas&gt;
</example>

<p><tagname>animator</tagname>で利用できるものは<tagname>animatorgroup</tagname>
でも可能です。これらの属性は子要素のアニメータに渡されます。</p>

<p><event>onstart</event>や<event>onstop</event>等のイベント、
<attribute>name</attribute>や<attribute>id</attribute>等の属性は子要素に渡されません。
又、animatorgroupで定義された<attribute>start</attribute>属性は子要素に渡されます。
その結果子要素で定義されたstart属性は無視されます。</p>

<!--

<p> Also, animatorgroups can be contained within animatorgroups allowing for the encapsuation of more complex behavior.
This next example illustrates that point, by having the view now return back to its original position which requires
the object to be animated along both the x and y axis simultaneously after its initial movements on them separately.</p>

<example class="program" id="animatorgroup-2">
&lt;canvas&gt;
  &lt;view bgcolor="red" width="100" height="100"  &gt;
    &lt;animatorgroup process="sequential" &gt;
      &lt;animator attribute="x" to="100" duration="1000" /&gt;
      &lt;animator attribute="y" to="100" duration="1000" /&gt;
      &lt;animatorgroup  process="simultaneous" duration="1000" &gt;
        &lt;animator attribute="x" to="0" /&gt;
        &lt;animator attribute="y" to="0" /&gt;
      &lt;/animatorgroup&gt;
    &lt;/animatorgroup&gt; 
  &lt;/view&gt;
&lt;/canvas&gt;
</example>


<p> Note, that in the code above there was no duration set for the x
and y animators of the interior animatorgroup.  Attributes such as
duration, x, y, width, etc. can be defined in an animatorgroup and
these values will be adopted by every subanimator unless they already
have that attribute defined for themselves. If, as in the example
above, a duration value is assigned to an animated group, it does not
necessarily mean that the animatiorgroup will be confined to that
amount of time.  It means that every subanimator may use that
duration. If the process='simultaneous' and each subanimator uses the
group duration as their value then the length of total time for all
subanimators would equal the duration time for the animatorgroup</p>
-->

<seealso>
<tags>animator</tags>
</seealso>

</body>
</html>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->
